<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue组件</title>
</head>
<body>
<div id="app">
    <my></my>
</div>
<script src="vue.js"></script>
<script>
    Vue.component('my',{
        data:function (){
            return {
                text:'hello'
            }
        },
        template:'<p>{{text}}</p>'
    })
    new Vue({
        el:'#app'
    })



</script>
</body>
</html>